package com.koron.css2.serviceManage.impl;

import com.koron.css2.ServerInterface;
import com.koron.css2.serviceManage.bean.RequestBean;
import com.koron.css2.serviceManage.bean.UserInfoBean;
import com.koron.util.Constant;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.koron.ebs.mybatis.SessionFactory;
import org.swan.bean.MessageBean;

public class UserMixtureSave implements ServerInterface{
	private Logger log = LogManager.getLogger(UserMixtureSave.class);

	@Override
	public MessageBean<?> exec(SessionFactory factory, UserInfoBean userInfo, RequestBean req) {
		try {
//			UserMixtureMapper mapper = factory.getMapper(UserMixtureMapper.class);
//			UserMixtureVO vo = JsonUtils.objectToPojo(req.getData(),UserMixtureVO.class);
//			mapper.deleteTemp(vo.getId());
//			for(UserMixtureBean bean:vo.getList()) {			
//					bean.setCreateInfo(userInfo);
//					bean.setTenantId(vo.getId());
//					mapper.insertTemp(bean);
//			}
			
		}catch(Exception e) {
			log.error("保存失败", e);
			return MessageBean.create(Constant.ILLEGAL_PARAMETER, "保存失败", void.class);
		}
		return MessageBean.create(Constant.MESSAGE_INT_SUCCESS, "success", void.class);
	}
	

}
